package com.education.user.controller.app;


import com.education.common.utils.ApiReturnObject;
import com.education.common.utils.QiniuUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"APP--获取七牛云服务器的token"})
@RestController
@RequestMapping("/UploadQiniu")
public class UpLoadQiniuController {

    /**
     * 获取七牛云服务器的token
     * @return
     */
    @ApiOperation(value = "获取七牛云服务器的token", httpMethod = "GET")
    @GetMapping("/QiniuToken")
    public ApiReturnObject findByQiniuToken(){
        QiniuUtil qiniuUtil = new QiniuUtil();
        return new ApiReturnObject("200","成功",qiniuUtil.createToken());
    }
}
